﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.controllers {
    import flash.events.*;
    import net.wooga.pets.events.*;
    import net.wooga.pets.constants.*;
    import org.robotlegs.mvcs.*;

    public class HandleGroupProgressCommand extends Command {

		[Inject]
        public var event:InfoEvent;

        override public function execute():void{
            switch (this.event.id){
                case GameConstants.PRELOAD_BASICS:
                    this.dispatchProgress();
                    break;
                case GameConstants.PRELOAD_HOSPITAL:
                    this.dispatchProgress();
                    break;
            };
        }
        private function dispatchProgress():void{
            var _local1:int = int(this.event.info.current);
            var _local2:int = int(this.event.info.total);
            var _local3:ProgressEvent = new ProgressEvent(ProgressEvent.PROGRESS, true, false, _local1, _local2);
            contextView.dispatchEvent(_local3);
        }

    }
}//package net.wooga.pets.controllers 
